--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Commit 25d5029780d9ab2bda0af57b5644279cca7b80a6
Parents : 5945dcf
Author : Sudo-Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-01-01T21:08:46-06:00
feat(notification): add missed call and new voicemail notifications with permission handling
Changes
1 files changed, 22 insertions(+), 0 deletions(-)
Diff
diff --git a/meshchatx/src/frontend/js/NotificationUtils.js b/meshchatx/src/frontend/js/NotificationUtils.js
index 76c0de9a..d12f4b81 100644
--- a/meshchatx/src/frontend/js/NotificationUtils.js
+++ b/meshchatx/src/frontend/js/NotificationUtils.js
@@ -10,6 +10,28 @@ class NotificationUtils {
});
}
+ static showMissedCallNotification(from) {
+ Notification.requestPermission().then((result) => {
+ if (result === "granted") {
+ new window.Notification("Missed Call", {
+ body: `You missed a call from ${from}.`,
+ tag: "missed_call",
+ });
+ }
+ });
+ }
+
+ static showNewVoicemailNotification(from) {
+ Notification.requestPermission().then((result) => {
+ if (result === "granted") {
+ new window.Notification("New Voicemail", {
+ body: `You have a new voicemail from ${from}.`,
+ tag: "new_voicemail",
+ });
+ }
+ });
+ }
+
static showNewMessageNotification() {
Notification.requestPermission().then((result) => {
if (result === "granted") {
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────